<LayoutTableSmall>
    <!-- 顶部 -->
    <template slot="top"></template>
    <!-- 其他 -->
    <template slot="other"></template>
    <!-- 搜索 -->
    <template slot="search">

        <el-form :inline="true" label-position="left" label-width="80px" :model="mixinTable_tableSearchData"
            @submit.native.prevent class="demo-form-inline">
            <el-form-item>
                <el-select v-model="mixinTable_tableSearchData.status"  @change="mixinTable_searchData" placeholder="审核状态" clearable>
                    <el-option label="待审核" value="0"></el-option>
                    <el-option label="审核通过" value="1"></el-option>
                    <el-option label="审核驳回" value="-1"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-input clearable v-model="mixinTable_tableSearchData.name" placeholder="请输入商品名称"
                    @change="mixinTable_searchData" style="width:200px">
                    <el-button slot="append" icon="el-icon-search" @click="mixinTable_searchData()"></el-button>
                </el-input>
            </el-form-item>
        </el-form>
    </template>
    <!-- 功能 -->
    <template slot="function">
        <el-button type="primary" @click="pass({type: 'batch'})">审核通过</el-button>
    </template>
    <!-- 表格 -->
    <template slot="table">
        <el-table v-loading="mixinTable_loading" :data="mixinTable_tableData" border style="width: 100%;"
            :ref="mixinPage_vueName+'TableSmall'" height="100%"
            @selection-change="mixinTable_handleSelectionChangeTableSmall">
            <el-table-column type="index" width="50" :index="mixinTable_indexMethod" align="center" label="#">
            </el-table-column>
            <el-table-column prop="id" label="商品ID" width="70">
            </el-table-column>
            <el-table-column label="商品" width="70">
                <template slot-scope="scope">
                    <ImageBox :src="scope.row.albumUrl" style="width: 60px;height: 60px;"></ImageBox>
                </template>
            </el-table-column>
            <el-table-column prop="name" label="商品名称" width="190">
            </el-table-column>
            <el-table-column prop="store_name" label="所属门店">
            </el-table-column>
            <el-table-column prop="categoryName" label="分类">
            </el-table-column>
            <el-table-column prop="salePrice" label="销售价(元)" width="100">
                <template slot-scope="scope">
                   {{$vFN.Tools.toMoneyCount(scope.row.salePrice)}}
                </template>
            </el-table-column>
            <el-table-column prop="stock" label="库存" width="100">
            </el-table-column>
            <el-table-column prop="status" label="审核状态">
                <template slot-scope="scope">
                    <div v-show="scope.row.status == 0">待审核</div>
                    <div v-show="scope.row.status == 1">审核通过</div>
                    <div v-show="scope.row.status == -1">审核驳回</div>
                </template>
            </el-table-column>
            <el-table-column prop="createdTimeStr" label="创建时间">
                <template slot-scope="scope">
                    {{$vFN.Utils.timestampFormat($vFN.Utils.stringToTimestamp(scope.row.createdTimeStr))}}
                </template>
            </el-table-column>
            <el-table-column label="操作" width="280" align="center">
                <template slot-scope="scope">

                    <template  v-if="scope.row.status == 0" >
                        <el-tooltip ceffect="dark" content="审核通过" placement="top" >
                            <el-button @click="pass({id: [scope.row.id], type: 'single'})" icon="el-icon-check" circle>
                            </el-button>
                        </el-tooltip>
                        <el-tooltip ceffect="dark" content="审核驳回" placement="top">
                            <el-button @click="reject({data:scope.row,id:scope.row.id})" icon="el-icon-close" circle>
                            </el-button>
                        </el-tooltip>
                     </template>

                    <el-tooltip ceffect="dark" content="订单详情" placement="top">
                        <el-button @click="details({data:scope.row,id:scope.row.id})" icon="el-icon-tickets" circle>
                        </el-button>
                    </el-tooltip>

                    <el-tooltip ceffect="dark" content="推广" placement="top" style="padding-left: 10px;">
                        <el-popover placement="bottom-end" title="" trigger="click"
                                @show="showCode(scope.row.id)">
                                <ShareQrcodeBox
                                                :ref="'shareQrcodeBox'+scope.row.id" 
                                                :appWindow="appWindow">
                                </ShareQrcodeBox>
                                <el-button slot="reference" icon="el-icon-s-promotion" circle></el-button>
                        </el-popover>
                     </el-tooltip>

                </template>
            </el-table-column>

        </el-table>

    </template>
    <!-- 表格选项 -->
    <template slot="options">
        <!-- <el-button :disabled="mixinTable_selectTableData.length<=0" @click="mixinTable_selectTableDeleteData()">
            停用已选</el-button>
        <el-button :disabled="mixinTable_selectTableData.length<=0"
            @click="mixinTable_clearSelectionChangeTableSmall()">取消选择
        </el-button> -->
    </template>
    <!-- 分页 -->
    <template slot="page">
        <el-pagination class="paginationStyle" v-if="mixinTable_pageData.total>0" background
            @current-change="mixinTable_pagingData($event)" :current-page="mixinTable_pageData.pageNum"
            :page-size.sync="$vFN.Constants.pageSize" layout="total, prev, pager, next,jumper"
            :total.sync="mixinTable_pageData.total">
        </el-pagination>
    </template>
</LayoutTableSmall>